<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
    <title>angularJs入门demo，循环对象数组</title>
    <script src="angular.min.js"></script>
    <script>
        //建立模块
        var app = angular.module("myApp",[]);
        //这个控制器本身就是一个方法，类似于一个类
        app.controller("myController",function ($scope) {
            $scope.list = [
                {name:'张三',shuxue:100,yuwen:100},
                {name:'李四',shuxue:90,yuwen:92},
                {name:'王五',shuxue:40,yuwen:50}
            ]
        })
    </script>
</head>
<body ng-app="myApp" ng-controller="myController">
<table>
    <!--循环tr，就在这加-->
    <!--表头和循环-->
    <tr>
        <td>姓名</td>
        <td>数学</td>
        <td>语文</td>
    </tr>
    <tr ng-repeat="entity in list">
        <td>{{entity.name}}</td>
        <td>{{entity.shuxue}}</td>
        <td>{{entity.yuwen}}<td>
    </tr>
</table>
</body>
</html>